home *** CD-ROM | disk | FTP | other *** search
- /* video4.c - higher level char and string output */
-
- #include "stdio.h"
- #include "cminor.h"
- #include "keyio.h"
- #include "video.h"
-
- int vid_tca(c,a) /* output char with attribute */
- int c ; /* char value */
- int a ; /* attribute value */
- {
- /* don't write attribute if */
- if( (c != ASCBEL) /* it is a special char */
- && (c != ASCCR ) && (c != ASCLF)
- && (c != ASCBS ) )
- vid_wca(c,a) ; /* write out the attrib. */
- vid_tc(c) ; /* now write char & advance cur. */
- }
-
- int vid_ts(s) /* output a string with TTY write */
- char *s ; /* the string to output */
- {
- while( *s != '\0' ) /* repeat until end of string */
- { vid_tc(*s) ; /* output current char */
- s = s + 1 ; /* point to next char */
- }
- }
-
-
- int vid_tsa(s,a) /* output string with attribute */
- char *s ; /* the string to output */
- int a ; /* the attribute */
- {
- while( *s != '\0' ) /* repeat until end of string */
- { vid_tca(*s,a) ; /* output curr. char & attribute */
- s = s + 1 ; /* point to next char */
- }
- }